//
//  TaskWallSystem.h
//  Fucker
//
//  Created by Coby on 17/9/5.
//  Copyright © 2017年 梦拓科技. All rights reserved.
//

#ifndef TaskWallSystem_h
#define TaskWallSystem_h
//========================================
//服务器
//========================================
#define BaseServer @"http://120.76.200.108:9999/v1" //基础服务器
#define ResourceDataServer @"http://120.76.200.108:9888/v1" //截图脚本资源服务器
#define QusetDataServer @"http://120.76.200.108:11111/v1" //小数据服务器
#define DataDownloadServer @"http://120.76.200.108:8082" //获取小数据下载服务器
#define BackgroundUIServer @"http://120.76.200.108:8888" //后台界面
#define CrontabQuestServer @"http://120.76.200.108:8000" //定时任务服务器
#define AccountServer @"http://120.76.200.108:9998/v1" //账号服务器


#define SelectedTaskFile @"/var/mobile/Library/Preferences/com.more-top.levelSelected.plist"
#define TaskFile @"/var/mobile/Library/Preferences/com.more-top.levelTaskHelper.plist"
#define UserSettingFile @"/var/mobile/Library/Preferences/com.more-top.levelHelperSetting.plist"
#define TaskUserSettingFile @"/var/mobile/Library/Preferences/com.more-top.levelTaskSetting.plist"
#define UserDeviceIDFile @"/var/mobile/Library/Preferences/com.more-top.levelDeviceID.plist"
#define UserDeviceNumFile @"/var/mobile/Media/TouchSprite/config/task_data.plist"
#define UserCurrentIPFile @"/var/mobile/Library/Preferences/com.more-top.levelCurrentIP.plist"


typedef enum _RechargeQusetState {
    ChargeNull  = 0,// 没有任务
    chareWaitInit=1,//任务初始化中
    ChargeWaitInput=2,// 等待输入信息
    ChargeWaitRequest=3,// 等待备份
    ChargeFinaRequst=4,
} RechargeQusetState;

#endif /* TaskWallSystem_h */
@interface TaskWallSystem : NSObject
@property (nonatomic, strong) NSString * userId;//用户ID
@property (nonatomic, strong) NSString * boundleId;//boundleID
@property (nonatomic, strong) NSString * type;//任务类型;1,新增 2，留存 4，新增重做 5，留存重做    

@property (nonatomic, strong) NSString * service_id;//service_id 投放ID
@property (nonatomic, strong) NSString * service_daily_id;//今日任务id 今
@property (nonatomic, strong) NSString * deviceId;//设备唯一标识
@property (nonatomic, strong) NSString * deviceString; //手机型号
@property (nonatomic, strong) NSString * systemVersion;//系统版本
@property (nonatomic, strong) NSString * appVersion;//香蕉系统版本号如0.0.1
@property (nonatomic, strong) __block NSMutableDictionary * chargeQuestList;//香蕉系统版本号如0.0.1
@property (nonatomic, strong) __block NSMutableDictionary * SelectedTaskFromList;//香蕉系统版本号如0.0.1
@property (nonatomic, strong) __block NSMutableDictionary * ChargeTaskList;//香蕉系统版本号如0.0.1
@property (nonatomic, strong) __block NSMutableDictionary * CommitParamaList;//香蕉系统版本号如0.0.1
@property (nonatomic, strong) __block NSMutableDictionary * Commitresult;//香蕉系统版本号如0.0.1

@property (nonatomic, assign) RechargeQusetState rechargetQuestState;//任务状态
+ (TaskWallSystem*)sharedInstance;
- (void)requestServiceList:(void (^)(void))callback;

- (void)baseRequestWithParam:(NSDictionary *)param requestURL:(NSString *)requestURL succeededBlock:(void(^)(id responseObject))succeededData errorBlock:(void(^)(NSError *error))errorData;

- (void)requestUseGetWithParam:(NSDictionary *)param requestURL:(NSString *)requestURL succeededBlock:(void(^)(id responseObject))succeededData errorBlock:(void(^)(NSError *error))errorData;

- (void)requestSelectedTaskWithParam:(NSMutableDictionary *)param  requestURL:(NSString *)requestURL taskType:(int)taskType callback:(void (^)(void))callback;


- (void)requestTaskRecharge:(void (^)(void))callback;
- (void)requestdeviceRecycle:(void (^)(void))callback;
- (void)commitTask:(void (^)(void))callback;
@end
